﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

using Twilio.TwilML.BaseTypes;

namespace Twilio.TwilML
{
    public class Pause : GatherVerb
    {
        private int _Length = 1;
        [XmlAttribute("length"), DefaultValue(1)]
        public int Length 
        {
            get { return _Length; }
            set
            {
                if (value < 1) throw new ArgumentOutOfRangeException("Length", "Length must be a positive integer greater than 0.");
                else _Length = value;
            }
        }

        public Pause() { }
        public Pause(int length)
        {
            Length = length;
        }
    }
}
